package peer.tools;

public class Mdb {
	public byte[] md;
	int hashCode;
	public Mdb(byte[] md){
		this.md=md;
		hashCode=peer.tools.Pmd52f.byteArrayToHexString(md).hashCode();
	}
	
	public boolean equals(Object ob){
		Mdb mi=(Mdb)ob;
		boolean b=true;
		if(mi!=null){
			for(int i=0;i<16;i++){
				if(mi.md[i]!=md[i]){
					b=false;
					break;
				}
			}
			return b;
		}else{
			return false;
		}
		
	}
	
	public int hashCode(){
		return hashCode;
	}
	
	public String toString(){
		return peer.tools.Pmd52f.byteArrayToHexString(md);
	}
}
